package com.limit.control.admin.validate;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class LoginValidator extends Validator {

	@Override
	protected void validate(Controller c) {
		this.validateRequired("username", "message", "用户名不能为空！");
		this.validateRequired("password", "message", "密码不能为空！");
	}

	@Override
	protected void handleError(Controller c) {
		c.keepPara("username");
        c.render("/admin/login.html");
	}

}
